package com.treasure.mall.biz.repository.order;

import com.treasure.mall.biz.base.JpaSearchableRepository;
import com.treasure.mall.biz.entity.order.BizOrderPO;
import com.treasure.mall.zbq.common.ienum.order.OrderEnums;
import org.springframework.stereotype.Repository;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/6/14
 */
@Repository
public interface BizOrderRepository extends JpaSearchableRepository<BizOrderPO, String> {
    boolean existsByAuctionSessionIdAndPayStatusAndUserPO_UserId(Long sessionId, OrderEnums.PayStatus payStatus, Long userId);

    BizOrderPO findByAuctionSessionIdAndPayStatusAndUserPO_UserId(Long sessionId, OrderEnums.PayStatus payStatus, Long userId);
}
